inherited fmAddSpecCond: TfmAddSpecCond
  Left = 450
  Top = 58
  Width = 803
  Height = 926
  BorderIcons = [biMinimize, biMaximize]
  Caption = 'fmAddSpecCond'
  Constraints.MinHeight = 780
  Constraints.MinWidth = 800
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 861
    Width = 787
  end
  inherited Panel1: TPanel
    Width = 787
    Height = 33
    inherited BitBtn1: TBitBtn
      Left = 626
      Top = 4
    end
    inherited BitBtn2: TBitBtn
      Left = 706
      Top = 4
    end
  end
  object pc: TcxPageControl [2]
    Left = 0
    Top = 31
    Width = 777
    Height = 826
    ActivePage = cxTabSheet2
    TabOrder = 2
    ClientRectBottom = 825
    ClientRectLeft = 1
    ClientRectRight = 776
    ClientRectTop = 21
    object cxTabSheet1: TcxTabSheet
      Caption = #1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1086#1077' '#1089#1086#1075#1083#1072#1096#1077#1085#1080#1077
      ImageIndex = 0
      object Label2: TLabel
        Left = 10
        Top = 44
        Width = 82
        Height = 13
        Caption = #1053#1086#1084#1077#1088' '#1076#1086#1075#1086#1074#1086#1088#1072
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label18: TLabel
        Left = 8
        Top = 3
        Width = 92
        Height = 13
        Caption = #1055#1086#1083#1091#1095#1072#1090#1077#1083#1100' '#1091#1089#1083#1091#1075
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label4: TLabel
        Left = 280
        Top = 44
        Width = 85
        Height = 13
        Caption = #1044#1072#1090#1072' '#1074#1089#1090'. '#1074' '#1089#1080#1083#1091
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label3: TLabel
        Left = 146
        Top = 44
        Width = 123
        Height = 13
        Caption = #1053#1086#1084#1077#1088' '#1076#1086#1075#1086#1074#1086#1088#1072' '#1085#1072' '#1076#1086#1082'.'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object GroupBox1: TGroupBox
        Left = 2
        Top = 92
        Width = 543
        Height = 111
        Caption = #1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1086#1077' '#1089#1086#1075#1083#1072#1096#1077#1085#1080#1077
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 0
        TabStop = True
        object Label6: TLabel
          Left = 9
          Top = 15
          Width = 60
          Height = 13
          Caption = #1053#1086#1084#1077#1088' '#1089#1086#1075#1083'.'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clGray
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
        end
        object Label7: TLabel
          Left = 8
          Top = 60
          Width = 89
          Height = 13
          Caption = #1044#1072#1090#1072' '#1087#1086#1076#1087#1080#1089#1072#1085#1080#1103
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clGray
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
        end
        object Label9: TLabel
          Left = 288
          Top = 60
          Width = 90
          Height = 13
          Caption = #1044#1072#1090#1072' '#1079#1072#1074#1077#1088#1096#1077#1085#1080#1103
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clGray
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
        end
        object Label1: TLabel
          Left = 157
          Top = 60
          Width = 110
          Height = 13
          Caption = #1053#1072#1095#1072#1083#1086' '#1087#1088#1077#1076#1086#1089#1090'. '#1091#1089#1083'.'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clGray
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
        end
        object Label22: TLabel
          Left = 416
          Top = 60
          Width = 96
          Height = 13
          Caption = #1044#1072#1090#1072' '#1088#1072#1089#1090#1086#1088#1078#1077#1085#1080#1103
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clGray
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
          Visible = False
        end
        object edSCNUM_N: TDBEdit
          Left = 9
          Top = 29
          Width = 82
          Height = 27
          TabStop = False
          Color = clMoneyGreen
          DataField = 'SCNUM_N'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -16
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          ReadOnly = True
          TabOrder = 5
        end
        object edSCNUMBER: TDBEdit
          Left = 363
          Top = 26
          Width = 174
          Height = 27
          DataField = 'SCNUMBER'
          DataSource = dlgDS
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -16
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          TabOrder = 4
        end
        object cxCheckBox2: TcxCheckBox
          Left = 244
          Top = 30
          Caption = #8470' '#1085#1072' '#1076#1086#1082#1091#1084#1077#1085#1090#1077
          Properties.OnChange = cxCheckBox2PropertiesChange
          Style.LookAndFeel.SkinName = ''
          StyleDisabled.LookAndFeel.SkinName = ''
          StyleFocused.LookAndFeel.SkinName = ''
          StyleHot.LookAndFeel.SkinName = ''
          TabOrder = 0
          Width = 109
        end
        object SCDATE: TcxDBDateEdit
          Left = 8
          Top = 78
          DataBinding.DataField = 'SCDATE'
          DataBinding.DataSource = dlgDS
          ParentFont = False
          Properties.DateButtons = [btnClear, btnToday]
          Properties.InputKind = ikMask
          Properties.SaveTime = False
          Properties.ShowTime = False
          Properties.WeekNumbers = True
          Properties.OnCloseUp = SCDATEPropertiesCloseUp
          Properties.OnEditValueChanged = SCDATEPropertiesEditValueChanged
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -16
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = [fsBold]
          Style.IsFontAssigned = True
          TabOrder = 1
          Width = 137
        end
        object SCDATEEND: TcxDBDateEdit
          Left = 288
          Top = 78
          DataBinding.DataField = 'SCDATEEND'
          DataBinding.DataSource = dlgDS
          ParentFont = False
          Properties.DateButtons = [btnClear, btnToday]
          Properties.InputKind = ikMask
          Properties.SaveTime = False
          Properties.ShowTime = False
          Properties.WeekNumbers = True
          Properties.OnChange = cxDBDateEdit1PropertiesChange
          Properties.OnCloseUp = SCDATEPropertiesCloseUp
          Properties.OnEditValueChanged = SCDATEENDPropertiesEditValueChanged
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -16
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = [fsBold]
          Style.IsFontAssigned = True
          TabOrder = 3
          Width = 121
        end
        object cxDBDateEdit1: TcxDBDateEdit
          Left = 157
          Top = 78
          DataBinding.DataField = 'SCDATEBEGIN'
          DataBinding.DataSource = dlgDS
          ParentFont = False
          Properties.DateButtons = [btnClear, btnToday]
          Properties.InputKind = ikMask
          Properties.SaveTime = False
          Properties.ShowTime = False
          Properties.WeekNumbers = True
          Properties.OnChange = cxDBDateEdit1PropertiesChange
          Properties.OnCloseUp = SCDATEPropertiesCloseUp
          Properties.OnEditValueChanged = SCDATEENDPropertiesEditValueChanged
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -16
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = [fsBold]
          Style.IsFontAssigned = True
          TabOrder = 2
          Width = 121
        end
        object edRastorj: TcxDBDateEdit
          Left = 416
          Top = 78
          DataBinding.DataField = 'SCDATERASTORJ'
          DataBinding.DataSource = dlgDS
          ParentFont = False
          Properties.DateButtons = [btnClear, btnToday]
          Properties.InputKind = ikMask
          Properties.SaveTime = False
          Properties.ShowTime = False
          Properties.WeekNumbers = True
          Properties.OnCloseUp = SCDATEPropertiesCloseUp
          Style.Color = clSkyBlue
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -16
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = [fsBold]
          Style.IsFontAssigned = True
          TabOrder = 6
          Visible = False
          Width = 121
        end
      end
      object GroupBox2: TGroupBox
        Left = 2
        Top = 216
        Width = 766
        Height = 577
        Caption = #1059#1089#1083#1091#1075#1072
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 1
        TabStop = True
        object DBMemo2: TDBMemo
          Left = 9
          Top = 88
          Width = 438
          Height = 94
          Align = alCustom
          DataField = 'STDESCR'
          DataSource = dsServType
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          ReadOnly = True
          ScrollBars = ssVertical
          TabOrder = 5
        end
        object cxRadioGroup1: TcxRadioGroup
          Left = 3
          Top = 13
          Properties.Columns = 4
          Properties.Items = <
            item
              Caption = #1056#1072#1079#1086#1074#1072#1103
              Value = 0
            end
            item
              Caption = #1054#1089#1085#1086#1074#1085#1072#1103
              Value = 1
            end
            item
              Caption = #1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1072#1103
              Value = 2
            end
            item
              Caption = #1042#1089#1090#1091#1087#1080#1090'. '#1074#1079#1085#1086#1089
              Value = '3'
            end>
          Properties.OnChange = cxRadioGroup1PropertiesChange
          Style.Edges = []
          Style.Shadow = False
          TabOrder = 0
          Height = 38
          Width = 446
        end
        object cxDBLookupComboBox1: TcxDBLookupComboBox
          Left = 10
          Top = 53
          DataBinding.DataField = 'STID'
          DataBinding.DataSource = dsServices
          ParentFont = False
          Properties.DropDownListStyle = lsFixedList
          Properties.DropDownRows = 20
          Properties.KeyFieldNames = 'STID'
          Properties.ListColumns = <
            item
              Caption = #1059#1089#1083#1091#1075#1072
              FieldName = 'STNAME'
            end>
          Properties.ListSource = dsServType
          Properties.MaxLength = 0
          Properties.OnCloseUp = cxDBLookupComboBox1PropertiesCloseUp
          Properties.OnEditValueChanged = cxDBLookupComboBox1PropertiesEditValueChanged
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clBlack
          Style.Font.Height = -13
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = []
          Style.IsFontAssigned = True
          TabOrder = 2
          Width = 438
        end
        object cbArchiveserv: TcxCheckBox
          Left = 9
          Top = 11
          Caption = #1040#1088#1093#1080#1074#1085#1072#1103' '#1091#1089#1083#1091#1075#1072
          Enabled = False
          Properties.OnChange = cbArchiveservPropertiesChange
          TabOrder = 1
          Width = 113
        end
        object Panel2: TPanel
          Left = 7
          Top = 184
          Width = 418
          Height = 49
          TabOrder = 6
          object Label15: TLabel
            Left = 5
            Top = 4
            Width = 60
            Height = 13
            Caption = #1050#1086#1083#1080#1095#1077#1089#1090#1074#1086
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label10: TLabel
            Left = 169
            Top = 4
            Width = 69
            Height = 13
            Caption = #1042#1088#1077#1084#1103' '#1085#1072#1095#1072#1083#1072
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label17: TLabel
            Left = 304
            Top = 4
            Width = 87
            Height = 13
            Caption = #1042#1088#1077#1084#1103' '#1086#1082#1086#1085#1095#1072#1085#1080#1103
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object DBEdit1: TcxDBTextEdit
            Left = 4
            Top = 17
            DataBinding.DataField = 'SCOUNT'
            DataBinding.DataSource = dsServices
            ParentFont = False
            Properties.OnEditValueChanged = DBEdit1PropertiesEditValueChanged
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clBlack
            Style.Font.Height = -13
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.IsFontAssigned = True
            TabOrder = 0
            Width = 57
          end
          object dblSTTIMEBEGIN: TcxDBLabel
            Left = 166
            Top = 19
            AutoSize = True
            DataBinding.DataField = 'STTIMEBEGIN'
            DataBinding.DataSource = dsServType
            ParentColor = False
            ParentFont = False
            Style.Color = clMoneyGreen
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clBlack
            Style.Font.Height = -15
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.IsFontAssigned = True
          end
          object dblSTTIMEEND: TcxDBLabel
            Left = 302
            Top = 19
            AutoSize = True
            DataBinding.DataField = 'STTIMEEND'
            DataBinding.DataSource = dsServType
            ParentColor = False
            ParentFont = False
            Style.Color = clMoneyGreen
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clBlack
            Style.Font.Height = -15
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.IsFontAssigned = True
          end
        end
        object cxButton5: TcxButton
          Left = 442
          Top = 200
          Width = 115
          Height = 23
          Caption = #1057#1086#1079#1076#1072#1090#1100' '#1075#1088#1072#1092#1080#1082
          TabOrder = 3
          OnClick = cxButton5Click
          Glyph.Data = {
            76010000424D7601000000000000760000002800000020000000100000000100
            04000000000000010000130B0000130B00001000000000000000000000000000
            800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
            FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0033333333B333
            333B33FF33337F3333F73BB3777BB7777BB3377FFFF77FFFF77333B000000000
            0B3333777777777777333330FFFFFFFF07333337F33333337F333330FFFFFFFF
            07333337F33333337F333330FFFFFFFF07333337F33333337F333330FFFFFFFF
            07333FF7F33333337FFFBBB0FFFFFFFF0BB37777F3333333777F3BB0FFFFFFFF
            0BBB3777F3333FFF77773330FFFF000003333337F333777773333330FFFF0FF0
            33333337F3337F37F3333330FFFF0F0B33333337F3337F77FF333330FFFF003B
            B3333337FFFF77377FF333B000000333BB33337777777F3377FF3BB3333BB333
            3BB33773333773333773B333333B3333333B7333333733333337}
          NumGlyphs = 2
        end
        object cxButton4: TcxButton
          Left = 568
          Top = 200
          Width = 153
          Height = 23
          Caption = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100' '#1075#1088#1072#1092#1080#1082
          TabOrder = 4
          OnClick = cxButton4Click
          Glyph.Data = {
            76010000424D7601000000000000760000002800000020000000100000000100
            04000000000000010000120B0000120B00001000000000000000000000000000
            800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
            FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333000000
            000033333377777777773333330FFFFFFFF03FF3FF7FF33F3FF700300000FF0F
            00F077F777773F737737E00BFBFB0FFFFFF07773333F7F3333F7E0BFBF000FFF
            F0F077F3337773F3F737E0FBFBFBF0F00FF077F3333FF7F77F37E0BFBF00000B
            0FF077F3337777737337E0FBFBFBFBF0FFF077F33FFFFFF73337E0BF0000000F
            FFF077FF777777733FF7000BFB00B0FF00F07773FF77373377373330000B0FFF
            FFF03337777373333FF7333330B0FFFF00003333373733FF777733330B0FF00F
            0FF03333737F37737F373330B00FFFFF0F033337F77F33337F733309030FFFFF
            00333377737FFFFF773333303300000003333337337777777333}
          NumGlyphs = 2
        end
        object gbPodrazd: TGroupBox
          Left = 452
          Top = 29
          Width = 309
          Height = 49
          Caption = #1055#1086#1076#1088#1072#1079#1076#1077#1083#1077#1085#1080#1077
          TabOrder = 7
          Visible = False
          object ltvPodr: TdxDBLookupTreeView
            Left = 6
            Top = 19
            Width = 297
            Height = 24
            CanSelectParents = False
            DropDownRows = 25
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -13
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentColor = False
            ParentFont = False
            TabOrder = 0
            TabStop = True
            Text = 'ltvPodr'
            TreeViewColor = clWindow
            TreeViewCursor = crDefault
            TreeViewFont.Charset = DEFAULT_CHARSET
            TreeViewFont.Color = clWindowText
            TreeViewFont.Height = -11
            TreeViewFont.Name = 'MS Sans Serif'
            TreeViewFont.Style = []
            TreeViewIndent = 19
            TreeViewReadOnly = False
            TreeViewShowButtons = True
            TreeViewShowHint = False
            TreeViewShowLines = True
            TreeViewShowRoot = True
            TreeViewSortType = stNone
            TreeViewStateImages = DMInv.ilBJTree
            OnCloseUp = ltvPodrCloseUp
            DisplayField = 'SDNAME'
            DividedChar = '.'
            ImageIndexField = 'SDISDELETE'
            ListSource = dsSD
            KeyField = 'SDID'
            ListField = 'SDNAME'
            Options = [trDBCanDelete, trDBConfirmDelete, trCanDBNavigate, trSmartRecordCopy, trCheckHasChildren]
            ParentField = 'SDPARID'
            RootValue = 0
            TextStyle = tvtsShort
            DataField = 'SDID'
            DataSource = dsOsnPodr
          end
        end
        object gPhoto: TcxGrid
          Left = 452
          Top = 112
          Width = 308
          Height = 73
          TabOrder = 8
          TabStop = False
          OnExit = gPhotoExit
          LookAndFeel.Kind = lfStandard
          object vPhoto: TcxGridTableView
            NavigatorButtons.ConfirmDelete = False
            FilterBox.Visible = fvNever
            DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
            DataController.Summary.DefaultGroupSummaryItems = <>
            DataController.Summary.FooterSummaryItems = <>
            DataController.Summary.SummaryGroups = <>
            DataController.OnAfterCancel = vPhotoDataControllerAfterCancel
            DataController.OnAfterInsert = vPhotoDataControllerAfterInsert
            DataController.OnAfterPost = vPhotoDataControllerAfterPost
            DataController.OnBeforePost = vPhotoDataControllerBeforePost
            DataController.OnRecordChanged = vPhotoDataControllerRecordChanged
            OptionsCustomize.ColumnFiltering = False
            OptionsCustomize.ColumnGrouping = False
            OptionsData.Appending = True
            OptionsData.DeletingConfirmation = False
            OptionsView.CellAutoHeight = True
            OptionsView.ColumnAutoWidth = True
            OptionsView.GroupByBox = False
            OptionsView.Indicator = True
            object cPhotoSPID: TcxGridColumn
              DataBinding.ValueType = 'Integer'
              Visible = False
              VisibleForCustomization = False
            end
            object vPhotoNumber: TcxGridColumn
              Caption = #1053#1086#1084#1077#1088
              PropertiesClassName = 'TcxTextEditProperties'
              Properties.ValidateOnEnter = True
              Properties.OnValidate = vPhotoNumberPropertiesValidate
              SortIndex = 0
              SortOrder = soAscending
            end
            object vPhotoCount: TcxGridColumn
              Caption = #1050#1086#1083#1080#1095#1077#1089#1090#1074#1086
              DataBinding.ValueType = 'Integer'
              PropertiesClassName = 'TcxCurrencyEditProperties'
              Properties.DecimalPlaces = 0
              Properties.DisplayFormat = '#'
              Properties.MinValue = 1.000000000000000000
              Properties.NullString = '1'
            end
          end
          object cxGridLevel2: TcxGridLevel
            GridView = vPhoto
          end
        end
        object Panel4: TPanel
          Left = 452
          Top = 88
          Width = 308
          Height = 25
          Caption = 'Panel4'
          TabOrder = 9
          object dxbrdckcntrl1: TdxBarDockControl
            Left = 1
            Top = 1
            Width = 306
            Height = 22
            Align = dalTop
            BarManager = dxBarManager1
          end
        end
        object pBot: TPanel
          Left = 2
          Top = 238
          Width = 762
          Height = 337
          Align = alBottom
          BevelOuter = bvNone
          TabOrder = 10
          object Label13: TLabel
            Left = 9
            Top = 13
            Width = 81
            Height = 13
            Caption = #1056#1072#1089#1095#1077#1090#1085#1072#1103' '#1076#1072#1090#1072
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label11: TLabel
            Left = 105
            Top = 12
            Width = 32
            Height = 13
            Caption = #1058#1072#1088#1080#1092
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label16: TLabel
            Left = 290
            Top = 12
            Width = 95
            Height = 13
            Caption = #1056#1072#1089#1095#1077#1090#1085#1099#1081' '#1087#1077#1088#1080#1086#1076
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label19: TLabel
            Left = 12
            Top = 210
            Width = 118
            Height = 13
            Caption = #1058#1072#1088#1080#1092' '#1089' '#1091#1095#1077#1090#1086#1084' '#1089#1082#1080#1076#1082#1080
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label21: TLabel
            Left = 143
            Top = 210
            Width = 105
            Height = 13
            Caption = #1050#1086#1083'. '#1088#1072#1089#1095'. '#1087#1077#1088#1080#1086#1076#1086#1074
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label5: TLabel
            Left = 260
            Top = 210
            Width = 138
            Height = 13
            Caption = #1057#1091#1084#1084#1072' '#1087#1086' '#1076#1086#1087'. '#1089#1086#1075#1083#1072#1096#1077#1085#1080#1102
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label12: TLabel
            Left = 396
            Top = 226
            Width = 32
            Height = 18
            Align = alCustom
            Caption = #1088#1091#1073'.'
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clBlack
            Font.Height = -15
            Font.Name = 'Tahoma'
            Font.Style = [fsBold]
            ParentFont = False
          end
          object Label14: TLabel
            Left = 161
            Top = 252
            Width = 142
            Height = 13
            Align = alCustom
            Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081' '#1082' '#1089#1086#1075#1083#1072#1096#1077#1085#1080#1102
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object cxDBTextEdit2: TcxDBTextEdit
            Left = 104
            Top = 29
            TabStop = False
            DataBinding.DataField = 'STTARIF'
            DataBinding.DataSource = dsServType
            ParentFont = False
            Properties.ReadOnly = True
            Style.Color = clMoneyGreen
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clBlack
            Style.Font.Height = -13
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.TextStyle = [fsBold]
            Style.IsFontAssigned = True
            TabOrder = 0
            Width = 121
          end
          object edSCDATARASCH: TcxDBTextEdit
            Left = 8
            Top = 29
            DataBinding.DataField = 'SCDATARASCH'
            DataBinding.DataSource = dlgDS
            ParentFont = False
            Properties.OnEditValueChanged = edSCDATARASCHPropertiesEditValueChanged
            Properties.OnValidate = edSCDATARASCHPropertiesValidate
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clBlack
            Style.Font.Height = -13
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = [fsBold]
            Style.IsFontAssigned = True
            TabOrder = 1
            Width = 41
          end
          object lPeriod: TcxTextEdit
            Left = 289
            Top = 28
            TabStop = False
            ParentFont = False
            Properties.ReadOnly = True
            Style.Color = clMoneyGreen
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clGray
            Style.Font.Height = -13
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = [fsBold]
            Style.TextColor = clBlack
            Style.IsFontAssigned = True
            TabOrder = 2
            Text = 'lPeriod'
            Width = 121
          end
          object gbGrafPlat: TGroupBox
            Left = 431
            Top = 6
            Width = 330
            Height = 321
            Caption = #1043#1088#1072#1092#1080#1082' '#1087#1083#1072#1090#1077#1078#1077#1081
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
            TabOrder = 3
            object cxGrid1: TcxGrid
              Left = 2
              Top = 15
              Width = 326
              Height = 304
              Align = alClient
              TabOrder = 0
              TabStop = False
              LookAndFeel.Kind = lfStandard
              object cxGridDBTableView1: TcxGridDBTableView
                NavigatorButtons.ConfirmDelete = False
                NavigatorButtons.First.Visible = True
                NavigatorButtons.PriorPage.Visible = True
                NavigatorButtons.Prior.Visible = True
                NavigatorButtons.Next.Visible = True
                NavigatorButtons.NextPage.Visible = True
                NavigatorButtons.Last.Visible = True
                NavigatorButtons.Insert.Visible = False
                NavigatorButtons.Append.Visible = False
                NavigatorButtons.Delete.Visible = False
                NavigatorButtons.Edit.Visible = False
                NavigatorButtons.Post.Visible = False
                NavigatorButtons.Cancel.Visible = False
                NavigatorButtons.Refresh.Visible = False
                NavigatorButtons.SaveBookmark.Visible = False
                NavigatorButtons.GotoBookmark.Visible = False
                NavigatorButtons.Filter.Visible = False
                DataController.DataSource = DataSource3
                DataController.Summary.DefaultGroupSummaryItems = <>
                DataController.Summary.FooterSummaryItems = <
                  item
                    Format = '#,###0'
                    Kind = skSum
                    FieldName = 'GPAMOUNT'
                    Column = cxGridDBTableView1GPAMOUNT
                  end
                  item
                    Format = '0'
                    Kind = skCount
                    FieldName = 'GPID'
                    Column = cxGridDBTableView1GPDATE
                  end>
                DataController.Summary.SummaryGroups = <>
                OptionsBehavior.CellHints = True
                OptionsBehavior.ImmediateEditor = False
                OptionsBehavior.IncSearch = True
                OptionsCustomize.ColumnFiltering = False
                OptionsCustomize.ColumnGrouping = False
                OptionsData.CancelOnExit = False
                OptionsData.Deleting = False
                OptionsData.DeletingConfirmation = False
                OptionsData.Editing = False
                OptionsData.Inserting = False
                OptionsView.NavigatorOffset = 10
                OptionsView.CellAutoHeight = True
                OptionsView.ColumnAutoWidth = True
                OptionsView.Footer = True
                OptionsView.GroupByBox = False
                OptionsView.Indicator = True
                OptionsView.ShowColumnFilterButtons = sfbAlways
                Preview.Visible = True
                Styles.Content = DMInv.cxData
                Styles.IncSearch = DMInv.cxKrasniyText
                Styles.Selection = DMInv.cxJoltiyFon
                Styles.Header = DMInv.cxSiniyText
                object cxGridDBTableView1GPDATE: TcxGridDBColumn
                  Caption = #1044#1072#1090#1072' '#1087#1083#1072#1090#1077#1078#1072
                  DataBinding.FieldName = 'GPDATE'
                  Width = 59
                end
                object cxGridDBTableView1GPAMOUNT: TcxGridDBColumn
                  Caption = #1057#1091#1084#1084#1072', '#1088#1091#1073'.'
                  DataBinding.FieldName = 'GPAMOUNT'
                  Options.Editing = False
                  Options.Sorting = False
                  Width = 68
                end
                object cxGridDBTableView1GPBEGINPERIOD: TcxGridDBColumn
                  Caption = #1053#1072#1095#1072#1083#1086' '#1087#1077#1088#1080#1086#1076#1072
                  DataBinding.FieldName = 'GPBEGINPERIOD'
                  Width = 88
                end
                object cxGridDBTableView1GPENDPERIOD: TcxGridDBColumn
                  Caption = #1050#1086#1085#1077#1094' '#1087#1077#1088#1080#1086#1076#1072
                  DataBinding.FieldName = 'GPENDPERIOD'
                  Width = 95
                end
              end
              object cxGridLevel1: TcxGridLevel
                GridView = cxGridDBTableView1
              end
            end
          end
          object cxCheckBox1: TcxCheckBox
            Left = 5
            Top = 57
            Caption = #1057#1082#1080#1076#1082#1072'/'#1053#1072#1076#1073#1072#1074#1082#1072
            Properties.OnChange = cxCheckBox1PropertiesChange
            Style.LookAndFeel.SkinName = ''
            StyleDisabled.LookAndFeel.SkinName = ''
            StyleFocused.LookAndFeel.SkinName = ''
            StyleHot.LookAndFeel.SkinName = ''
            TabOrder = 4
            Width = 121
          end
          object GroupBox5: TGroupBox
            Left = 7
            Top = 76
            Width = 418
            Height = 136
            TabOrder = 5
            object Label24: TLabel
              Left = 352
              Top = 57
              Width = 34
              Height = 19
              Align = alCustom
              Caption = #1088#1091#1073'.'
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clBlack
              Font.Height = -16
              Font.Name = 'Tahoma'
              Font.Style = [fsBold]
              ParentFont = False
            end
            object Label20: TLabel
              Left = 9
              Top = 82
              Width = 115
              Height = 13
              Align = alCustom
              Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081' '#1082' '#1089#1082#1080#1076#1082#1077
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clGray
              Font.Height = -11
              Font.Name = 'Tahoma'
              Font.Style = []
              ParentFont = False
            end
            object edSCDISCOUNT: TDBEdit
              Left = 270
              Top = 51
              Width = 77
              Height = 27
              DataField = 'SCDISCOUNT'
              DataSource = dlgDS
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clBlack
              Font.Height = -16
              Font.Name = 'Tahoma'
              Font.Style = [fsBold]
              ParentFont = False
              TabOrder = 2
              OnChange = edSCDISCOUNTChange
            end
            object mdSCDISCOUNTNOTE: TDBMemo
              Left = 9
              Top = 99
              Width = 216
              Height = 32
              Align = alCustom
              DataField = 'SCDISCOUNTNOTE'
              DataSource = dlgDS
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clBlack
              Font.Height = -13
              Font.Name = 'Tahoma'
              Font.Style = [fsBold]
              ParentFont = False
              TabOrder = 3
            end
            object bDiscConfirm: TcxButton
              Left = 253
              Top = 102
              Width = 130
              Height = 25
              Caption = #1055#1086#1076#1090#1074'. '#1089#1082#1080#1076#1082#1080
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -13
              Font.Name = 'Tahoma'
              Font.Style = [fsBold]
              ParentFont = False
              TabOrder = 4
              Visible = False
              OnClick = bDiscConfirmClick
              Glyph.Data = {
                BE060000424DBE06000000000000360400002800000024000000120000000100
                0800000000008802000000000000000000000001000000000000000000000000
                80000080000000808000800000008000800080800000C0C0C000C0DCC000F0C8
                A400000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                0000000000000000000000000000000000000000000000000000000000000000
                000000000000000000000000000000000000F0FBFF00A4A0A000808080000000
                FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00030303030303
                0303030303030303030303030303030303030303030303030303030303030303
                03030303030303030303030303030303030303030303FF030303030303030303
                03030303030303040403030303030303030303030303030303F8F8FF03030303
                03030303030303030303040202040303030303030303030303030303F80303F8
                FF030303030303030303030303040202020204030303030303030303030303F8
                03030303F8FF0303030303030303030304020202020202040303030303030303
                0303F8030303030303F8FF030303030303030304020202FA0202020204030303
                0303030303F8FF0303F8FF030303F8FF03030303030303020202FA03FA020202
                040303030303030303F8FF03F803F8FF0303F8FF03030303030303FA02FA0303
                03FA0202020403030303030303F8FFF8030303F8FF0303F8FF03030303030303
                FA0303030303FA0202020403030303030303F80303030303F8FF0303F8FF0303
                0303030303030303030303FA0202020403030303030303030303030303F8FF03
                03F8FF03030303030303030303030303FA020202040303030303030303030303
                0303F8FF0303F8FF03030303030303030303030303FA02020204030303030303
                03030303030303F8FF0303F8FF03030303030303030303030303FA0202020403
                030303030303030303030303F8FF0303F8FF03030303030303030303030303FA
                0202040303030303030303030303030303F8FF03F8FF03030303030303030303
                03030303FA0202030303030303030303030303030303F8FFF803030303030303
                030303030303030303FA0303030303030303030303030303030303F803030303
                0303030303030303030303030303030303030303030303030303030303030303
                0303}
              NumGlyphs = 2
            end
            object cxDBRadioGroup1: TcxDBRadioGroup
              Left = 26
              Top = 11
              DataBinding.DataField = 'SCTYPEOFDISC'
              DataBinding.DataSource = dlgDS
              Properties.Columns = 2
              Properties.Items = <
                item
                  Caption = #1057#1082#1080#1076#1082#1072
                  Value = 0
                end
                item
                  Caption = #1053#1072#1076#1073#1072#1074#1082#1072
                  Value = 1
                end>
              Properties.OnEditValueChanged = cxDBRadioGroup1PropertiesEditValueChanged
              Style.Edges = []
              TabOrder = 0
              Height = 31
              Width = 352
            end
            object cxDBRadioGroup2: TcxDBRadioGroup
              Left = 10
              Top = 44
              DataBinding.DataField = 'SCTYPEOFDISCOUNT'
              DataBinding.DataSource = dlgDS
              Properties.Columns = 2
              Properties.Items = <
                item
                  Caption = #1040#1073#1089#1086#1083'.'
                  Value = 0
                end
                item
                  Caption = #1042' %'
                  Value = 1
                end>
              Properties.OnChange = cxDBRadioGroup2PropertiesChange
              Properties.OnEditValueChanged = cxDBRadioGroup2PropertiesEditValueChanged
              Style.Edges = [bLeft, bTop, bRight, bBottom]
              TabOrder = 1
              Height = 37
              Width = 215
            end
          end
          object eSCTARIFWITHDISCOUNT: TcxDBTextEdit
            Left = 12
            Top = 225
            TabStop = False
            DataBinding.DataField = 'SCTARIFWITHDISCOUNT'
            DataBinding.DataSource = dlgDS
            ParentFont = False
            Properties.ReadOnly = True
            Style.Color = clMoneyGreen
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clBlack
            Style.Font.Height = -16
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.TextStyle = [fsBold]
            Style.IsFontAssigned = True
            TabOrder = 6
            Width = 117
          end
          object eKolPeriod: TcxTextEdit
            Left = 143
            Top = 225
            TabStop = False
            ParentFont = False
            Properties.ReadOnly = True
            Style.Color = clMoneyGreen
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clGray
            Style.Font.Height = -16
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = [fsBold]
            Style.TextColor = clBlack
            Style.IsFontAssigned = True
            TabOrder = 7
            Text = '0'
            Width = 74
          end
          object eSCAMOUNT: TcxDBTextEdit
            Left = 260
            Top = 225
            TabStop = False
            DataBinding.DataField = 'SCAMOUNT'
            DataBinding.DataSource = dlgDS
            ParentFont = False
            Properties.ReadOnly = True
            Properties.OnChange = cxDBTextEdit1PropertiesChange
            Style.Color = clMoneyGreen
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clBlack
            Style.Font.Height = -16
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.TextStyle = [fsBold]
            Style.IsFontAssigned = True
            TabOrder = 8
            Width = 133
          end
          object bCalc: TcxButton
            Left = 16
            Top = 272
            Width = 129
            Height = 33
            Caption = #1056#1072#1089#1095#1077#1090' '#1090#1072#1088#1080#1092#1072
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clWindowText
            Font.Height = -13
            Font.Name = 'Tahoma'
            Font.Style = [fsBold]
            ParentFont = False
            TabOrder = 9
            OnClick = bCalcClick
            Glyph.Data = {
              F6000000424DF600000000000000760000002800000010000000100000000100
              0400000000008000000000000000000000001000000000000000000000000000
              8000008000000080800080000000800080008080000080808000C0C0C0000000
              FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFF7
              0007FFFFFF700070FBB0FFFFF00FBB0700077000007000788088088880288880
              00FB080890888808800008888088880888080808002888800088088880228888
              88880808000000000000088888880FFFFFFF080000080FFFFFFF080E0E080FFF
              FFFF080000080FFFFFFF088888880FFFFFFF700000007FFFFFFF}
          end
          object DBMemo1: TDBMemo
            Left = 161
            Top = 270
            Width = 264
            Height = 57
            Align = alCustom
            DataField = 'SNOTE'
            DataSource = dsServices
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clBlack
            Font.Height = -13
            Font.Name = 'Tahoma'
            Font.Style = [fsBold]
            ParentFont = False
            ScrollBars = ssVertical
            TabOrder = 10
          end
        end
        object pMed: TPanel
          Left = 2
          Top = 63
          Width = 762
          Height = 175
          Align = alBottom
          BevelOuter = bvNone
          TabOrder = 11
          object Label8: TLabel
            Left = 9
            Top = 12
            Width = 292
            Height = 13
            Caption = #1055#1086#1083#1085#1086#1077' '#1085#1072#1079#1074#1072#1085#1080#1077' '#1083#1077#1082#1072#1088#1089#1090#1074#1077#1085#1085#1086#1075#1086' '#1089#1088#1077#1076#1089#1090#1074#1072', '#1074#1080#1076' '#1086#1089#1084#1086#1090#1088#1072
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label23: TLabel
            Left = 9
            Top = 124
            Width = 98
            Height = 13
            Caption = #1056#1072#1079#1086#1074#1072#1103' '#1076#1086#1079#1080#1088#1086#1074#1082#1072
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object Label25: TLabel
            Left = 153
            Top = 124
            Width = 88
            Height = 13
            Caption = #1050#1086#1083#1080#1095#1077#1089#1090#1074#1086' '#1076#1085#1077#1081
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clGray
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            ParentFont = False
          end
          object mCaption: TcxMemo
            Left = 8
            Top = 29
            ParentFont = False
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clGray
            Style.Font.Height = -13
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = [fsBold]
            Style.TextColor = clWindowText
            Style.IsFontAssigned = True
            TabOrder = 0
            Height = 92
            Width = 481
          end
          object seDoze: TcxSpinEdit
            Left = 9
            Top = 142
            ParentFont = False
            Properties.AssignedValues.MinValue = True
            Properties.DisplayFormat = '0.###'
            Properties.EditFormat = '0.###'
            Properties.ImmediatePost = True
            Properties.ValueType = vtFloat
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clWindowText
            Style.Font.Height = -16
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = [fsBold]
            Style.IsFontAssigned = True
            TabOrder = 1
            Width = 128
          end
          object gTimeHour: TcxGrid
            Left = 504
            Top = 37
            Width = 240
            Height = 84
            TabOrder = 2
            TabStop = False
            OnExit = gPhotoExit
            LookAndFeel.Kind = lfStandard
            object vTime: TcxGridTableView
              NavigatorButtons.ConfirmDelete = False
              FilterBox.Visible = fvNever
              DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
              DataController.Summary.DefaultGroupSummaryItems = <>
              DataController.Summary.FooterSummaryItems = <>
              DataController.Summary.SummaryGroups = <>
              DataController.OnAfterCancel = vTimeDataControllerAfterCancel
              DataController.OnAfterDelete = vTimeDataControllerAfterCancel
              DataController.OnAfterInsert = vTimeDataControllerAfterCancel
              DataController.OnAfterPost = vTimeDataControllerAfterCancel
              OptionsCustomize.ColumnFiltering = False
              OptionsCustomize.ColumnGrouping = False
              OptionsData.Appending = True
              OptionsData.DeletingConfirmation = False
              OptionsView.CellAutoHeight = True
              OptionsView.ColumnAutoWidth = True
              OptionsView.GroupByBox = False
              OptionsView.Indicator = True
              object vTimeHour: TcxGridColumn
                Caption = #1042#1088#1077#1084#1103' '#1087#1088#1086#1094#1077#1076#1091#1088#1099
                DataBinding.ValueType = 'Integer'
                PropertiesClassName = 'TcxComboBoxProperties'
                Properties.ClearKey = 46
                Properties.DropDownListStyle = lsFixedList
                Properties.Items.Strings = (
                  '8'
                  '9'
                  '10'
                  '11'
                  '12'
                  '13'
                  '14'
                  '15'
                  '16'
                  '17'
                  '18'
                  '19'
                  '20')
                SortIndex = 0
                SortOrder = soAscending
              end
            end
            object cxGridLevel3: TcxGridLevel
              GridView = vTime
            end
          end
          object Panel5: TPanel
            Left = 504
            Top = 8
            Width = 240
            Height = 25
            Caption = 'Panel4'
            TabOrder = 3
            object dxBarDockControl1: TdxBarDockControl
              Left = 1
              Top = 1
              Width = 238
              Height = 22
              Align = dalTop
              BarManager = dxBarManager1
            end
          end
          object seCount: TcxSpinEdit
            Left = 153
            Top = 142
            ParentFont = False
            Properties.AssignedValues.MinValue = True
            Properties.DisplayFormat = '0'
            Properties.EditFormat = '0'
            Properties.ImmediatePost = True
            Properties.MaxValue = 30.000000000000000000
            Properties.ValueType = vtInt
            Properties.OnEditValueChanged = seCountPropertiesEditValueChanged
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clWindowText
            Style.Font.Height = -16
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = [fsBold]
            Style.IsFontAssigned = True
            TabOrder = 4
            Width = 128
          end
        end
      end
      object edAGNUM_N: TDBEdit
        Left = 8
        Top = 61
        Width = 127
        Height = 27
        TabStop = False
        Color = clMoneyGreen
        DataField = 'AGID'
        DataSource = dsAgr
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -16
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        ReadOnly = True
        TabOrder = 2
      end
      object edPoluch: TcxTextEdit
        Left = 8
        Top = 18
        TabStop = False
        ParentFont = False
        Properties.ReadOnly = True
        Style.Color = clMoneyGreen
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -13
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
        TabOrder = 3
        Text = 'edPoluch'
        Width = 401
      end
      object edAGNUM: TDBEdit
        Left = 280
        Top = 61
        Width = 126
        Height = 27
        TabStop = False
        Color = clMoneyGreen
        DataField = 'AGDATEBEGIN'
        DataSource = dsAgr
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -16
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        ReadOnly = True
        TabOrder = 4
      end
      object DBEdit2: TDBEdit
        Left = 144
        Top = 61
        Width = 126
        Height = 27
        TabStop = False
        Color = clMoneyGreen
        DataField = 'AGNUM'
        DataSource = dsAgr
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -16
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        ReadOnly = True
        TabOrder = 5
      end
      object pRodstv: TPanel
        Left = 432
        Top = 32
        Width = 321
        Height = 41
        Caption = #1045#1089#1090#1100' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1080#1082'(-'#1080') '#1074' '#1086#1073#1088#1072#1079#1086#1074#1072#1090'. '#1087#1086#1076#1088#1072#1079#1076'.'
        Color = clMaroon
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWhite
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 6
      end
      object cbSCAPPROVED: TcxDBCheckBox
        Left = 600
        Top = 128
        Caption = #1054#1076#1086#1073#1088#1077#1085#1086'?'
        DataBinding.DataField = 'SCAPPROVED'
        DataBinding.DataSource = dlgDS
        ParentColor = False
        ParentFont = False
        Properties.NullStyle = nssUnchecked
        Properties.ValueChecked = 1
        Properties.ValueUnchecked = 0
        Style.Color = clMoneyGreen
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -19
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = []
        Style.IsFontAssigned = True
        TabOrder = 7
        Visible = False
        Width = 121
      end
    end
    object cxTabSheet2: TcxTabSheet
      Caption = #1050#1086#1087#1080#1103
      ImageIndex = 1
      object Panel3: TPanel
        Left = 6
        Top = 35
        Width = 763
        Height = 748
        TabOrder = 0
        object PdfViewer1: TPdfViewer
          Left = 1
          Top = 1
          Width = 761
          Height = 746
          Align = alClient
          About = 'Synactis PDF Viewer version 1.0'
          AutoOpen = True
          Copies = 1
          EndPage = 0
          FitMode = vmFitBoxHorz
          LayoutMode = lmDontCare
          PageMode = pmStandard
          ShowPrintDialog = True
          ShowScrollBars = True
          ShowToolBar = True
          ShrinkToMargins = True
          StartPage = 1
        end
      end
      object cxButton1: TcxButton
        Left = 8
        Top = 5
        Width = 166
        Height = 25
        Caption = #1044#1086#1073#1072#1074#1080#1090#1100'/'#1048#1079#1084#1077#1085#1080#1090#1100
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 1
        OnClick = cxButton1Click
        Glyph.Data = {
          76010000424D7601000000000000760000002800000020000000100000000100
          04000000000000010000CE0E0000D80E00001000000000000000000000000000
          80000080000000808000800000008000800080800000C0C0C000808080000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
          3333333333387F3333333333333333333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333387FFFFFFFFFFFFF3344444444444433387777777F777777334444444444
          4433388888887F8888883333333443333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333333333387F33333333333334433333333333333877333333333333333333
          3333333333388833333333333333333333333333333333333333}
        NumGlyphs = 2
      end
      object cxButton2: TcxButton
        Left = 534
        Top = 742
        Width = 105
        Height = 25
        Caption = #1057#1082#1072#1085#1080#1088#1086#1074#1072#1090#1100
        TabOrder = 2
        Visible = False
        OnClick = cxButton2Click
        Glyph.Data = {
          76010000424D7601000000000000760000002800000020000000100000000100
          04000000000000010000130B0000130B00001000000000000000000000000000
          800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0033333333B333
          333B33FF33337F3333F73BB3777BB7777BB3377FFFF77FFFF77333B000000000
          0B3333777777777777333330FFFFFFFF07333337F33333337F333330FFFFFFFF
          07333337F33333337F333330FFFFFFFF07333337F33333337F333330FFFFFFFF
          07333FF7F33333337FFFBBB0FFFFFFFF0BB37777F3333333777F3BB0FFFFFFFF
          0BBB3777F3333FFF77773330FFFF000003333337F333777773333330FFFF0FF0
          33333337F3337F37F3333330FFFF0F0B33333337F3337F77FF333330FFFF003B
          B3333337FFFF77377FF333B000000333BB33337777777F3377FF3BB3333BB333
          3BB33773333773333773B333333B3333333B7333333733333337}
        NumGlyphs = 2
      end
      object cxButton3: TcxButton
        Left = 647
        Top = 743
        Width = 104
        Height = 25
        Caption = #1059#1076#1072#1083#1080#1090#1100
        TabOrder = 3
        Visible = False
        OnClick = cxButton3Click
        Glyph.Data = {
          76010000424D7601000000000000760000002800000020000000100000000100
          0400000000000001000000000000000000001000000000000000000000000000
          8000008000000080800080000000800080008080000080808000C0C0C0000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
          3333333333333333333333333333333333333333333333333333333333333333
          3333333333333333333333337333333333333333F33333333333333313333333
          333333337F33333333333333113333713333333377F33377F333333371733717
          3333333377F3377F333333333117311333333333377F377F3333333337111133
          33333333337777F33333333337111333333333333F777F333333333371111733
          3333333337777F3333333333117311733333333377F377F33333333333333117
          333333333333377F33333333333333117333333333333377F333333333333333
          3333333333333333333333333333333333333333333333333333}
        NumGlyphs = 2
      end
    end
  end
  inherited dlgDS: TDataSource
    Left = 440
    Top = 58
  end
  object odScan: TOpenDialog
    Filter = 'PDF|*.pdf'
    InitialDir = 'c:\'
    Left = 472
    Top = 56
  end
  object qSCScan: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qSCScanAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT S.*'
      'FROM SC_SCAN S'
      'WHERE S.SCID = :SCID')
    UpdateObject = quSCScan
    GeneratorField.Field = 'SCSID'
    GeneratorField.Generator = 'GEN_SC_SCAN'
    Left = 507
    Top = 56
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end>
    object qSCScanSCSID: TIntegerField
      FieldName = 'SCSID'
      Origin = '"SC_SCAN"."SCSID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qSCScanSCID: TIntegerField
      FieldName = 'SCID'
      Origin = '"SC_SCAN"."SCID"'
      Required = True
    end
    object qSCScanSCSIMAGE: TBlobField
      FieldName = 'SCSIMAGE'
      Origin = '"SC_SCAN"."SCSIMAGE"'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object qSCScanSCSNOTE: TIBStringField
      FieldName = 'SCSNOTE'
      Origin = '"SC_SCAN"."SCSNOTE"'
      Size = 255
    end
    object qSCScanSCSUSERENTER: TIBStringField
      FieldName = 'SCSUSERENTER'
      Origin = '"SC_SCAN"."SCSUSERENTER"'
      Size = 40
    end
    object qSCScanSCSTIMEENTER: TDateTimeField
      FieldName = 'SCSTIMEENTER'
      Origin = '"SC_SCAN"."SCSTIMEENTER"'
    end
    object qSCScanSCSUSEREDIT: TIBStringField
      FieldName = 'SCSUSEREDIT'
      Origin = '"SC_SCAN"."SCSUSEREDIT"'
      Size = 40
    end
    object qSCScanSCSTIMEEDIT: TDateTimeField
      FieldName = 'SCSTIMEEDIT'
      Origin = '"SC_SCAN"."SCSTIMEEDIT"'
    end
  end
  object quSCScan: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  SCSID,'
      '  SCID,'
      '  SCSIMAGE,'
      '  SCSNOTE,'
      '  SCSUSERENTER,'
      '  SCSTIMEENTER,'
      '  SCSUSEREDIT,'
      '  SCSTIMEEDIT'
      'from SC_SCAN '
      'where'
      '  SCSID = :SCSID')
    ModifySQL.Strings = (
      'update SC_SCAN'
      'set'
      '  SCID = :SCID,'
      '  SCSID = :SCSID,'
      '  SCSIMAGE = :SCSIMAGE,'
      '  SCSNOTE = :SCSNOTE,'
      '  SCSTIMEEDIT = :SCSTIMEEDIT,'
      '  SCSTIMEENTER = :SCSTIMEENTER,'
      '  SCSUSEREDIT = :SCSUSEREDIT,'
      '  SCSUSERENTER = :SCSUSERENTER'
      'where'
      '  SCSID = :OLD_SCSID')
    InsertSQL.Strings = (
      'insert into SC_SCAN'
      
        '  (SCID, SCSID, SCSIMAGE, SCSNOTE, SCSTIMEEDIT, SCSTIMEENTER, SC' +
        'SUSEREDIT, '
      '   SCSUSERENTER)'
      'values'
      
        '  (:SCID, :SCSID, :SCSIMAGE, :SCSNOTE, :SCSTIMEEDIT, :SCSTIMEENT' +
        'ER, :SCSUSEREDIT, '
      '   :SCSUSERENTER)')
    DeleteSQL.Strings = (
      'delete from SC_SCAN'
      'where'
      '  SCSID = :OLD_SCSID')
    Left = 539
    Top = 56
  end
  object dsServices: TDataSource
    DataSet = qServices
    Left = 784
    Top = 208
  end
  object qServices: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qServicesAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT S.*, ST.*'
      'FROM SERVICES S'
      'INNER JOIN SERVICES_TYPE ST ON ST.STID = S.STID'
      'WHERE S.SISDELETE IS NULL'
      '    AND S.SCID = :SCID'
      'order by 1')
    UpdateObject = quServices
    GeneratorField.Field = 'SID'
    GeneratorField.Generator = 'GEN_SERVICES'
    Left = 816
    Top = 208
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end>
    object qServicesSID: TIntegerField
      FieldName = 'SID'
      Origin = '"SERVICES"."SID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qServicesSCID: TIntegerField
      FieldName = 'SCID'
      Origin = '"SERVICES"."SCID"'
      Required = True
    end
    object qServicesSTID: TIntegerField
      FieldName = 'STID'
      Origin = '"SERVICES"."STID"'
    end
    object qServicesSCOUNT: TIntegerField
      DisplayLabel = #1050#1086#1083'-'#1074#1086
      FieldName = 'SCOUNT'
      Origin = '"SERVICES"."SCOUNT"'
    end
    object qServicesSNOTE: TIBStringField
      FieldName = 'SNOTE'
      Origin = '"SERVICES"."SNOTE"'
      Size = 255
    end
    object qServicesSUSERENTER: TIBStringField
      FieldName = 'SUSERENTER'
      Origin = '"SERVICES"."SUSERENTER"'
      Size = 40
    end
    object qServicesSTIMEENTER: TDateTimeField
      FieldName = 'STIMEENTER'
      Origin = '"SERVICES"."STIMEENTER"'
    end
    object qServicesSUSEREDIT: TIBStringField
      FieldName = 'SUSEREDIT'
      Origin = '"SERVICES"."SUSEREDIT"'
      Size = 40
    end
    object qServicesSTIMEEDIT: TDateTimeField
      FieldName = 'STIMEEDIT'
      Origin = '"SERVICES"."STIMEEDIT"'
    end
    object qServicesSISDELETE: TIntegerField
      FieldName = 'SISDELETE'
      Origin = '"SERVICES"."SISDELETE"'
    end
    object qServicesSTNAME: TIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      FieldName = 'STNAME'
      Origin = '"SERVICES_TYPE"."STNAME"'
      Size = 255
    end
    object qServicesSTDESCR: TIBStringField
      FieldName = 'STDESCR'
      Origin = '"SERVICES_TYPE"."STDESCR"'
      Size = 2048
    end
    object qServicesSTDATEBEGIN: TDateField
      FieldName = 'STDATEBEGIN'
      Origin = '"SERVICES_TYPE"."STDATEBEGIN"'
    end
    object qServicesSTIMEBEGIN: TTimeField
      FieldName = 'STIMEBEGIN'
      Origin = '"SERVICES"."STIMEBEGIN"'
    end
    object qServicesSTIMEEND: TTimeField
      FieldName = 'STIMEEND'
      Origin = '"SERVICES"."STIMEEND"'
    end
    object qServicesSTID1: TIntegerField
      FieldName = 'STID1'
      Origin = '"SERVICES_TYPE"."STID"'
    end
    object qServicesSTTYPE: TIntegerField
      FieldName = 'STTYPE'
      Origin = '"SERVICES_TYPE"."STTYPE"'
    end
    object qServicesSTEDIZMER: TIntegerField
      FieldName = 'STEDIZMER'
      Origin = '"SERVICES_TYPE"."STEDIZMER"'
    end
    object qServicesSTTARIF: TIBBCDField
      FieldName = 'STTARIF'
      Origin = '"SERVICES_TYPE"."STTARIF"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qServicesSTDATEEND: TDateField
      FieldName = 'STDATEEND'
      Origin = '"SERVICES_TYPE"."STDATEEND"'
    end
    object qServicesSTTIME: TTimeField
      FieldName = 'STTIME'
      Origin = '"SERVICES_TYPE"."STTIME"'
    end
    object qServicesSTPODRTYPE: TIntegerField
      FieldName = 'STPODRTYPE'
      Origin = '"SERVICES_TYPE"."STPODRTYPE"'
    end
    object qServicesSTNOTE: TIBStringField
      FieldName = 'STNOTE'
      Origin = '"SERVICES_TYPE"."STNOTE"'
      Size = 255
    end
    object qServicesSTISDELETE: TIntegerField
      FieldName = 'STISDELETE'
      Origin = '"SERVICES_TYPE"."STISDELETE"'
    end
    object qServicesSTUSERENTER: TIBStringField
      FieldName = 'STUSERENTER'
      Origin = '"SERVICES_TYPE"."STUSERENTER"'
      Size = 40
    end
    object qServicesSTTIMEENTER: TDateTimeField
      FieldName = 'STTIMEENTER'
      Origin = '"SERVICES_TYPE"."STTIMEENTER"'
    end
    object qServicesSTUSEREDIT: TIBStringField
      FieldName = 'STUSEREDIT'
      Origin = '"SERVICES_TYPE"."STUSEREDIT"'
      Size = 40
    end
    object qServicesSTTIMEEDIT: TDateTimeField
      FieldName = 'STTIMEEDIT'
      Origin = '"SERVICES_TYPE"."STTIMEEDIT"'
    end
    object qServicesSTISARCHIVE: TIntegerField
      FieldName = 'STISARCHIVE'
      Origin = '"SERVICES_TYPE"."STISARCHIVE"'
    end
  end
  object quServices: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  SID,'
      '  SCID,'
      '  STID,'
      '  SCOUNT,'
      '  SNOTE,'
      '  STIMEBEGIN,'
      '  STIMEEND,'
      '  SUSERENTER,'
      '  STIMEENTER,'
      '  SUSEREDIT,'
      '  STIMEEDIT,'
      '  SISDELETE,'
      '  STNAME,'
      '  STDESCR,'
      '  STDATEBEGIN'
      'from SERVICES '
      'where'
      '  SID = :SID')
    ModifySQL.Strings = (
      'update SERVICES'
      'set'
      '  SCID = :SCID,'
      '  SCOUNT = :SCOUNT,'
      '  SID = :SID,'
      '  SISDELETE = :SISDELETE,'
      '  SNOTE = :SNOTE,'
      '  STID = :STID,'
      '  STIMEBEGIN = :STIMEBEGIN,'
      '  STIMEEND = :STIMEEND'
      'where'
      '  SID = :OLD_SID')
    InsertSQL.Strings = (
      'insert into SERVICES'
      
        '  (SCID, SCOUNT, SID, SISDELETE, SNOTE, STID, STIMEBEGIN, STIMEE' +
        'ND)'
      'values'
      
        '  (:SCID, :SCOUNT, :SID, :SISDELETE, :SNOTE, :STID, :STIMEBEGIN,' +
        ' '
      '   :STIMEEND)')
    DeleteSQL.Strings = (
      'null;')
    Left = 848
    Top = 208
  end
  object dsServType: TDataSource
    DataSet = qServType
    Left = 816
    Top = 376
  end
  object qServType: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT ST.*, '#39#39' AS SDNAME, -1 as "ISFOTO", -1 as "ISMED"'
      'FROM SERVICES_TYPE ST'
      'WHERE ST.STID = -1'
      'UNION'
      'SELECT ST.*, SD.SDNAME, '
      
        'case when Lower(ST.STNAME) like '#39'%'#1092#1086#1090#1086#1075#1088#1072#1092#1080#1103'%'#39' then 1 else -1 en' +
        'd,'
      
        'case when Lower(ST.STNAME) like '#39'%'#1084#1077#1076'. '#1087#1088#1086#1094#1077#1076#1091#1088#1099'.%'#39' then 1 else ' +
        '-1 end'
      'FROM SERVICES_TYPE ST'
      'INNER JOIN SYS_DIC Sd ON SD.SDID = ST.STEDIZMER'
      'WHERE  ST.STISDELETE IS NULL'
      '    AND ST.STTYPE = :STTYPE'
      '    AND ST.STPODR LIKE :PODR'
      '    AND ST.STISARCHIVE = :arch'
      '    AND ST.STID <> 406'
      'ORDER BY 2')
    GeneratorField.Field = 'STID'
    Left = 848
    Top = 376
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'STTYPE'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PODR'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'arch'
        ParamType = ptUnknown
      end>
    object qServTypeSTID: TIntegerField
      FieldName = 'STID'
      Origin = '"SERVICES_TYPE"."STID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qServTypeSTNAME: TIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      FieldName = 'STNAME'
      Origin = '"SERVICES_TYPE"."STNAME"'
      Size = 255
    end
    object qServTypeSTDESCR: TIBStringField
      DisplayLabel = #1054#1087#1080#1089#1072#1085#1080#1077
      FieldName = 'STDESCR'
      Origin = '"SERVICES_TYPE"."STDESCR"'
      Size = 2048
    end
    object qServTypeSTTARIF: TIBBCDField
      DisplayLabel = #1058#1072#1088#1080#1092
      FieldName = 'STTARIF'
      Origin = '"SERVICES_TYPE"."STTARIF"'
      Required = True
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qServTypeSTDATEBEGIN: TDateField
      DisplayLabel = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072
      FieldName = 'STDATEBEGIN'
      Origin = '"SERVICES_TYPE"."STDATEBEGIN"'
    end
    object qServTypeSTDATEEND: TDateField
      DisplayLabel = #1044#1072#1090#1072' '#1079#1072#1074#1077#1088#1096
      FieldName = 'STDATEEND'
      Origin = '"SERVICES_TYPE"."STDATEEND"'
    end
    object qServTypeSTNOTE: TIBStringField
      DisplayLabel = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
      FieldName = 'STNOTE'
      Origin = '"SERVICES_TYPE"."STNOTE"'
      Size = 255
    end
    object qServTypeSTTIMEENTER: TDateTimeField
      FieldName = 'STTIMEENTER'
      Origin = '"SERVICES_TYPE"."STTIMEENTER"'
    end
    object qServTypeSTTIMEEDIT: TDateTimeField
      FieldName = 'STTIMEEDIT'
      Origin = '"SERVICES_TYPE"."STTIMEEDIT"'
    end
    object qServTypeSTISDELETE: TIntegerField
      FieldName = 'STISDELETE'
      Origin = '"SERVICES_TYPE"."STISDELETE"'
      Visible = False
    end
    object qServTypeSTUSERENTER: TIBStringField
      FieldName = 'STUSERENTER'
      Origin = '"SERVICES_TYPE"."STUSERENTER"'
      Size = 40
    end
    object qServTypeSTUSEREDIT: TIBStringField
      FieldName = 'STUSEREDIT'
      Origin = '"SERVICES_TYPE"."STUSEREDIT"'
      Size = 40
    end
    object qServTypeSTTYPE: TIntegerField
      FieldName = 'STTYPE'
      Origin = '"SERVICES_TYPE"."STTYPE"'
    end
    object qServTypeSTEDIZMER: TIntegerField
      FieldName = 'STEDIZMER'
      Origin = '"SERVICES_TYPE"."STEDIZMER"'
    end
    object qServTypeSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qServTypeSTTIME: TTimeField
      FieldName = 'STTIME'
      Origin = '"SERVICES_TYPE"."STTIME"'
    end
    object qServTypeSTPODRTYPE: TIntegerField
      FieldName = 'STPODRTYPE'
      Origin = '"SERVICES_TYPE"."STPODRTYPE"'
    end
    object qServTypeSTISARCHIVE: TIntegerField
      FieldName = 'STISARCHIVE'
      Origin = '"SERVICES_TYPE"."STISARCHIVE"'
    end
    object qServTypeSTPODR: TIBStringField
      FieldName = 'STPODR'
      Origin = '"SERVICES_TYPE"."STPODR"'
    end
    object qServTypeSTPERIODOPLATY: TIntegerField
      FieldName = 'STPERIODOPLATY'
      Origin = '"SERVICES_TYPE"."STPERIODOPLATY"'
    end
    object qServTypeSTSYSPODR: TIntegerField
      FieldName = 'STSYSPODR'
      Origin = '"SERVICES_TYPE"."STSYSPODR"'
    end
    object qServTypeSTISCALCGRAF: TIntegerField
      FieldName = 'STISCALCGRAF'
      Origin = '"SERVICES_TYPE"."STISCALCGRAF"'
    end
    object qServTypeSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"SERVICES_TYPE"."SDID"'
    end
    object qServTypeSTTIMEBEGIN: TTimeField
      FieldName = 'STTIMEBEGIN'
      Origin = '"SERVICES_TYPE"."STTIMEBEGIN"'
    end
    object qServTypeSTTIMEEND: TTimeField
      FieldName = 'STTIMEEND'
      Origin = '"SERVICES_TYPE"."STTIMEEND"'
    end
    object qServTypeISFOTO: TIntegerField
      FieldName = 'ISFOTO'
    end
    object qServTypeISMED: TIntegerField
      FieldName = 'ISMED'
    end
  end
  object qChekRegistration: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT U.URID'
      'FROM USERFORREGISTRATION U'
      'WHERE U.USERNAME = :guser')
    GeneratorField.Field = 'SCID'
    Left = 848
    Top = 440
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'guser'
        ParamType = ptUnknown
      end>
    object qChekRegistrationURID: TIntegerField
      FieldName = 'URID'
      Origin = '"USERFORREGISTRATION"."URID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
  end
  object qChekdiscoundConfirm: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT U.UAID'
      'FROM USERFORAUTORISATION U'
      'WHERE U.UAUSERNAME = :guser')
    GeneratorField.Field = 'SCID'
    Left = 816
    Top = 440
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'guser'
        ParamType = ptUnknown
      end>
    object qChekdiscoundConfirmUAID: TIntegerField
      FieldName = 'UAID'
      Origin = '"USERFORAUTORISATION"."UAID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
  end
  object dsAgr: TDataSource
    Left = 504
    Top = 8
  end
  object qMinPeriod: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT t1.*'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 17'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid'
      'WHERE NOT EXISTS'
      '('
      'SELECT t2.sdid'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 17'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t2'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid'
      'WHERE t2.sdparid = t1.sdid'
      ')')
    GeneratorField.Field = 'SDID'
    Left = 544
    Top = 632
    object IntegerField4: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object IntegerField5: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
    object IBStringField2: TIBStringField
      DisplayLabel = ' '
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 2304
    end
  end
  object DataSource2: TDataSource
    DataSet = qMinPeriod
    Left = 504
    Top = 632
  end
  object qPayData: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction2
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT GP.GPDATE, SUM(GP.GPAMOUNT)'
      'FROM SC_GRAFPLAT_TEMP GP'
      'WHERE GP.SCID = :SCID'
      '    AND GP.GPAMOUNT > 0'
      'GROUP BY 1')
    GeneratorField.Field = 'PDID'
    Left = 632
    Top = 376
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end>
    object qPayDataGPDATE: TDateField
      FieldName = 'GPDATE'
      Origin = '"SC_GRAFPLAT_TEMP"."GPDATE"'
    end
    object qPayDataSUM: TFMTBCDField
      DefaultExpression = '#,##0.00'
      FieldName = 'SUM'
      ProviderFlags = []
      currency = True
      Precision = 18
      Size = 6
    end
  end
  object dsPayData: TDataSource
    DataSet = qPayData
    Left = 600
    Top = 376
  end
  object qInsertTemp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction2
    DataSource = dlgDS
    SQL.Strings = (
      'INSERT INTO SC_GRAFPLAT_TEMP'
      
        '(GPID, SCID, GPMONTH, GPCOUNTPAYDATE, GPCOUNTDAYMONTH, GPTARIF, ' +
        'GPDATE, GPNOTEEDIT, GPUSERID)'
      
        'SELECT SCT.GPID, SCT.SCID, SCT.GPMONTH, SCT.GPCOUNTPAYDATE,SCT.G' +
        'PCOUNTDAYMONTH,'
      'SCT.GPTARIF, SCT.GPDATE, SCT.GPNOTEEDIT, :GPUSERID'
      'FROM SC_GRAFPLAT SCT'
      'WHERE SCT.SCID = :SCID')
    GeneratorField.Field = 'GPID'
    Left = 641
    Top = 498
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'GPUSERID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end>
  end
  object qDeleteGrTemp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction2
    SQL.Strings = (
      'DELETE'
      'FROM SC_GRAFPLAT_TEMP GP'
      'WHERE GP.GPUSERID = :GPUSERID')
    GeneratorField.Field = 'GPID'
    Left = 681
    Top = 498
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'GPUSERID'
        ParamType = ptUnknown
      end>
  end
  object qGPInsertUpd: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'MERGE INTO SC_GRAFPLAT SC'
      'using'
      '(SELECT SCT1.*'
      
        'FROM SC_GRAFPLAT_TEMP SCT1 WHERE SCT1.GPUSERID = :GPUSERID) AS S' +
        'CT ON (SC.GPID = SCT.GPID)'
      
        'WHEN MATCHED THEN UPDATE SET SC.GPCOUNTPAYDATE = CAST(SCT.GPCOUN' +
        'TPAYDATE AS INTEGER), SC.GPCOUNTDAYMONTH = CAST(SCT.GPCOUNTDAYMO' +
        'NTH AS INTEGER),'
      
        'SC.GPTARIF = SCT.GPTARIF, SC.GPDATE = SCT.GPDATE, SC.GPNOTEEDIT ' +
        ' = SCT.GPNOTEEDIT, SC.GPCOUNT = SCT.GPCOUNT, SC.GPAMOUNT = SCT.G' +
        'PAMOUNT'
      
        'WHEN NOT MATCHED THEN INSERT (GPID, SCID, GPMONTH, GPCOUNTPAYDAT' +
        'E, GPCOUNTDAYMONTH, GPTARIF, GPDATE, GPNOTEEDIT, GPCOUNT, GPAMOU' +
        'NT)'
      
        'VALUES (SCT.GPID, SCT.SCID, SCT.GPMONTH, CAST(SCT.GPCOUNTPAYDATE' +
        ' AS INTEGER), CAST(SCT.GPCOUNTDAYMONTH AS INTEGER), SCT.GPTARIF,' +
        ' SCT.GPDATE, SCT.GPNOTEEDIT, SCT.GPCOUNT, SCT.GPAMOUNT)')
    Left = 641
    Top = 532
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'GPUSERID'
        ParamType = ptUnknown
      end>
  end
  object DataSource1: TDataSource
    Left = 65
    Top = 124
  end
  object qGPDelete: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction2
    DataSource = dlgDS
    SQL.Strings = (
      'DELETE'
      'FROM SC_GRAFPLAT GP'
      'WHERE GP.SCID = :SCID')
    Left = 641
    Top = 572
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end>
  end
  object DataSource3: TDataSource
    DataSet = qGrafPlat1
    Left = 512
    Top = 504
  end
  object qGrafPlat1: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qGrafPlat1AfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT GP.*'
      'FROM SC_GRAFPLAT GP'
      'WHERE GP.SCID = :SCID'
      'order by gp.gpdate'
      '')
    UpdateObject = IBUpdateSQL1
    GeneratorField.Field = 'GPID'
    GeneratorField.Generator = 'GEN_SC_GRAFPLAT_ID'
    Left = 553
    Top = 506
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end>
    object qGrafPlat1GPID: TIntegerField
      FieldName = 'GPID'
      Origin = '"SC_GRAFPLAT"."GPID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qGrafPlat1SCID: TIntegerField
      FieldName = 'SCID'
      Origin = '"SC_GRAFPLAT"."SCID"'
    end
    object qGrafPlat1GPMONTH: TIntegerField
      FieldName = 'GPMONTH'
      Origin = '"SC_GRAFPLAT"."GPMONTH"'
    end
    object qGrafPlat1GPCOUNTPAYDATE: TIntegerField
      FieldName = 'GPCOUNTPAYDATE'
      Origin = '"SC_GRAFPLAT"."GPCOUNTPAYDATE"'
    end
    object qGrafPlat1GPCOUNTDAYMONTH: TIntegerField
      FieldName = 'GPCOUNTDAYMONTH'
      Origin = '"SC_GRAFPLAT"."GPCOUNTDAYMONTH"'
    end
    object qGrafPlat1GPTARIF: TIBBCDField
      FieldName = 'GPTARIF'
      Origin = '"SC_GRAFPLAT"."GPTARIF"'
      Precision = 18
      Size = 2
    end
    object qGrafPlat1GPDATE: TDateField
      FieldName = 'GPDATE'
      Origin = '"SC_GRAFPLAT"."GPDATE"'
    end
    object qGrafPlat1GPNOTEEDIT: TIBStringField
      FieldName = 'GPNOTEEDIT'
      Origin = '"SC_GRAFPLAT"."GPNOTEEDIT"'
      Size = 255
    end
    object qGrafPlat1GPUSERENTER: TIBStringField
      FieldName = 'GPUSERENTER'
      Origin = '"SC_GRAFPLAT"."GPUSERENTER"'
      Size = 40
    end
    object qGrafPlat1GPTIMEENTER: TDateTimeField
      FieldName = 'GPTIMEENTER'
      Origin = '"SC_GRAFPLAT"."GPTIMEENTER"'
    end
    object qGrafPlat1GPUSEREDIT: TIBStringField
      FieldName = 'GPUSEREDIT'
      Origin = '"SC_GRAFPLAT"."GPUSEREDIT"'
      Size = 40
    end
    object qGrafPlat1GPTIMEEDIT: TDateTimeField
      FieldName = 'GPTIMEEDIT'
      Origin = '"SC_GRAFPLAT"."GPTIMEEDIT"'
    end
    object qGrafPlat1GPAMOUNT: TIBBCDField
      FieldName = 'GPAMOUNT'
      Origin = '"SC_GRAFPLAT"."GPAMOUNT"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qGrafPlat1GPCOUNT: TIBBCDField
      FieldName = 'GPCOUNT'
      Origin = '"SC_GRAFPLAT"."GPCOUNT"'
      Precision = 18
      Size = 2
    end
    object qGrafPlat1GPBEGINPERIOD: TDateField
      FieldName = 'GPBEGINPERIOD'
      Origin = '"SC_GRAFPLAT"."GPBEGINPERIOD"'
    end
    object qGrafPlat1GPENDPERIOD: TDateField
      FieldName = 'GPENDPERIOD'
      Origin = '"SC_GRAFPLAT"."GPENDPERIOD"'
    end
  end
  object IBUpdateSQL1: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  GPID,'
      '  SCID,'
      '  GPMONTH,'
      '  GPCOUNTPAYDATE,'
      '  GPCOUNTDAYMONTH,'
      '  GPTARIF,'
      '  GPDATE,'
      '  GPNOTEEDIT,'
      '  GPUSERENTER,'
      '  GPTIMEENTER,'
      '  GPUSEREDIT,'
      '  GPTIMEEDIT,'
      '  GPAMOUNT,'
      '  GPCOUNT,'
      '  GPBEGINPERIOD,'
      '  GPENDPERIOD'
      'from SC_GRAFPLAT '
      'where'
      '  GPID = :GPID')
    ModifySQL.Strings = (
      'update SC_GRAFPLAT'
      'set'
      '  GPAMOUNT = :GPAMOUNT,'
      '  GPBEGINPERIOD = :GPBEGINPERIOD,'
      '  GPCOUNT = :GPCOUNT,'
      '  GPCOUNTDAYMONTH = :GPCOUNTDAYMONTH,'
      '  GPCOUNTPAYDATE = :GPCOUNTPAYDATE,'
      '  GPDATE = :GPDATE,'
      '  GPENDPERIOD = :GPENDPERIOD,'
      '  GPID = :GPID,'
      '  GPMONTH = :GPMONTH,'
      '  GPNOTEEDIT = :GPNOTEEDIT,'
      '  GPTARIF = :GPTARIF,'
      '  GPTIMEEDIT = :GPTIMEEDIT,'
      '  GPTIMEENTER = :GPTIMEENTER,'
      '  GPUSEREDIT = :GPUSEREDIT,'
      '  GPUSERENTER = :GPUSERENTER,'
      '  SCID = :SCID'
      'where'
      '  GPID = :OLD_GPID')
    InsertSQL.Strings = (
      'insert into SC_GRAFPLAT'
      
        '  (GPAMOUNT, GPBEGINPERIOD, GPCOUNT, GPCOUNTDAYMONTH, GPCOUNTPAY' +
        'DATE, GPDATE, '
      
        '   GPENDPERIOD, GPID, GPMONTH, GPNOTEEDIT, GPTARIF, GPTIMEEDIT, ' +
        'GPTIMEENTER, '
      '   GPUSEREDIT, GPUSERENTER, SCID)'
      'values'
      
        '  (:GPAMOUNT, :GPBEGINPERIOD, :GPCOUNT, :GPCOUNTDAYMONTH, :GPCOU' +
        'NTPAYDATE, '
      
        '   :GPDATE, :GPENDPERIOD, :GPID, :GPMONTH, :GPNOTEEDIT, :GPTARIF' +
        ', :GPTIMEEDIT, '
      '   :GPTIMEENTER, :GPUSEREDIT, :GPUSERENTER, :SCID)')
    DeleteSQL.Strings = (
      'delete from SC_GRAFPLAT'
      'where'
      '  GPID = :OLD_GPID'
      'and scid = :old_scid')
    Left = 593
    Top = 506
  end
  object qRodstv: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    BeforeOpen = qRodstvBeforeOpen
    SQL.Strings = (
      'SELECT DP.SDID'
      'FROM RODSTVENNIK R'
      
        'INNER JOIN DETI_PODRAZD DP ON DP.PID = R.PID AND CURRENT_DATE BE' +
        'TWEEN CAST(dp.DPDATEIN AS DATE) AND COALESCE(CAST(dp.DPDATEOUT A' +
        'S DATE), CURRENT_DATE+3650)'
      
        'WHERE R.RID = (SELECT DISTINCT R1.RID FROM RODSTVENNIK R1 WHERE ' +
        'R1.PID = :PID)'
      'AND R.PID <> :PID')
    Left = 793
    Top = 108
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
  end
  object qCurPeriod: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT GP.GPDATE'
      'FROM SC_GRAFPLAT GP'
      
        'WHERE GP.SCID = :SCID AND :data BETWEEN GP.GPBEGINPERIOD and GP.' +
        'GPENDPERIOD'
      ''
      '')
    Left = 547
    Top = 222
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data'
        ParamType = ptUnknown
      end>
    object qCurPeriodGPDATE: TDateField
      FieldName = 'GPDATE'
      Origin = '"SC_GRAFPLAT"."GPDATE"'
    end
  end
  object qSD: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT t1.sdparid, t1.sdid, t1.sdname, t1.SDISDELETE'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, SDISDELETE)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, sd.SDISDELETE FROM' +
        ' SYS_DIC SD'
      '      WHERE sd.SDPARID = :SDPARID'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, sd1.SDISDELETE'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID, SDISDELETE FROM tree t'
      ') AS t1'
      'WHERE t1.SDISDELETE = 0'
      'UNION'
      
        'SELECT -1 AS SDPARID, -1 AS SDID, null AS SDNAME, 0 AS SDISDELET' +
        'E'
      'FROM SYS_DIC SD'
      'WHERE SD.SDID = :SDPARID AND SD.SDISDELETE = 0'
      'order by 1'
      '')
    GeneratorField.Field = 'SDID'
    Left = 696
    Top = 208
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SDPARID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'SDPARID'
        ParamType = ptUnknown
      end>
    object qSDSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qSDSDPARID: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
    object qSDSDNAME: TIBStringField
      DisplayLabel = #1069#1083#1077#1084#1077#1085#1090
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 2304
    end
    object qSDSDISDELETE: TIntegerField
      DisplayLabel = #1059#1076#1072#1083#1080#1090#1100'?'
      FieldName = 'SDISDELETE'
      Origin = '"SYS_DIC"."SDISDELETE"'
    end
  end
  object dsSD: TDataSource
    DataSet = qSD
    Left = 667
    Top = 206
  end
  object qOsnPodr: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qOsnPodrAfterInsert
    BeforeOpen = qOsnPodrBeforeOpen
    CachedUpdates = True
    SQL.Strings = (
      'SELECT DP.*, SD.SDNAME AS osn_podr'
      'FROM DETI_PODRAZD DP'
      'INNER JOIN SYS_DIC SD ON SD.SDID = DP.SDID'
      'WHERE DP.PID = :PID'
      'and '
      'CAST(dp.dpdateout AS DATE) = :dateend')
    UpdateObject = quOsnPodr
    GeneratorField.Field = 'DPID'
    GeneratorField.Generator = 'GEN_DETI_PODRAZD_ID'
    Left = 635
    Top = 236
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'dateend'
        ParamType = ptUnknown
      end>
    object qOsnPodrDPID: TIntegerField
      FieldName = 'DPID'
      Origin = '"DETI_PODRAZD"."DPID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qOsnPodrPID: TIntegerField
      FieldName = 'PID'
      Origin = '"DETI_PODRAZD"."PID"'
    end
    object qOsnPodrSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"DETI_PODRAZD"."SDID"'
    end
    object qOsnPodrDPDATEIN: TDateTimeField
      FieldName = 'DPDATEIN'
      Origin = '"DETI_PODRAZD"."DPDATEIN"'
    end
    object qOsnPodrINNOTE: TIBStringField
      FieldName = 'INNOTE'
      Origin = '"DETI_PODRAZD"."INNOTE"'
      Size = 255
    end
    object qOsnPodrDPDATEOUT: TDateTimeField
      FieldName = 'DPDATEOUT'
      Origin = '"DETI_PODRAZD"."DPDATEOUT"'
    end
    object qOsnPodrOUTNOTE: TIBStringField
      FieldName = 'OUTNOTE'
      Origin = '"DETI_PODRAZD"."OUTNOTE"'
      Size = 255
    end
    object qOsnPodrDPUSERENTER: TIBStringField
      FieldName = 'DPUSERENTER'
      Origin = '"DETI_PODRAZD"."DPUSERENTER"'
      Size = 40
    end
    object qOsnPodrDPTIMEENTER: TDateTimeField
      FieldName = 'DPTIMEENTER'
      Origin = '"DETI_PODRAZD"."DPTIMEENTER"'
    end
    object qOsnPodrDPUSEREDIT: TIBStringField
      FieldName = 'DPUSEREDIT'
      Origin = '"DETI_PODRAZD"."DPUSEREDIT"'
      Size = 40
    end
    object qOsnPodrDPTIMEEDIT: TDateTimeField
      FieldName = 'DPTIMEEDIT'
      Origin = '"DETI_PODRAZD"."DPTIMEEDIT"'
    end
    object qOsnPodrOSN_PODR: TIBStringField
      FieldName = 'OSN_PODR'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
  object dsOsnPodr: TDataSource
    DataSet = qOsnPodr
    Left = 603
    Top = 236
  end
  object quOsnPodr: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  DPID,'
      '  PID,'
      '  SDID,'
      '  DPDATEIN,'
      '  INNOTE,'
      '  DPDATEOUT,'
      '  OUTNOTE,'
      '  DPUSERENTER,'
      '  DPTIMEENTER,'
      '  DPUSEREDIT,'
      '  DPTIMEEDIT,'
      '  OSN_PODR'
      'from DETI_PODRAZD '
      'where'
      '  DPID = :DPID')
    ModifySQL.Strings = (
      'update DETI_PODRAZD'
      'set'
      '  DPDATEIN = :DPDATEIN,'
      '  DPDATEOUT = :DPDATEOUT,'
      '  DPID = :DPID,'
      '  INNOTE = :INNOTE,'
      '  OUTNOTE = :OUTNOTE,'
      '  PID = :PID,'
      '  SDID = :SDID'
      'where'
      '  DPID = :OLD_DPID')
    InsertSQL.Strings = (
      'insert into DETI_PODRAZD'
      '  (DPDATEIN, DPDATEOUT, DPID, INNOTE, OUTNOTE, PID, SDID)'
      'values'
      '  (:DPDATEIN, :DPDATEOUT, :DPID, :INNOTE, :OUTNOTE, :PID, :SDID)')
    DeleteSQL.Strings = (
      'delete from DETI_PODRAZD'
      'where'
      '  DPID = :OLD_DPID')
    Left = 667
    Top = 236
  end
  object qDopPodr: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qDopPodrAfterInsert
    BeforeOpen = qDopPodrBeforeOpen
    CachedUpdates = True
    SQL.Strings = (
      'SELECT DP.*, SD.SDNAME AS osn_podr'
      'FROM DETI_PODRAZD_MISC DP'
      'INNER JOIN SYS_DIC SD ON SD.SDID = DP.SDID'
      'WHERE DP.PID = -1')
    UpdateObject = quDopPodr
    GeneratorField.Field = 'DPID'
    GeneratorField.Generator = 'GEN_DETI_PODRAZD_MISC_ID'
    Left = 635
    Top = 268
    object qDopPodrDPID: TIntegerField
      FieldName = 'DPID'
      Origin = '"DETI_PODRAZD_MISC"."DPID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qDopPodrPID: TIntegerField
      FieldName = 'PID'
      Origin = '"DETI_PODRAZD_MISC"."PID"'
    end
    object qDopPodrSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"DETI_PODRAZD_MISC"."SDID"'
    end
    object qDopPodrDPDATEIN: TDateTimeField
      FieldName = 'DPDATEIN'
      Origin = '"DETI_PODRAZD_MISC"."DPDATEIN"'
    end
    object qDopPodrINNOTE: TIBStringField
      FieldName = 'INNOTE'
      Origin = '"DETI_PODRAZD_MISC"."INNOTE"'
      Size = 255
    end
    object qDopPodrDPDATEOUT: TDateTimeField
      FieldName = 'DPDATEOUT'
      Origin = '"DETI_PODRAZD_MISC"."DPDATEOUT"'
    end
    object qDopPodrOUTNOTE: TIBStringField
      FieldName = 'OUTNOTE'
      Origin = '"DETI_PODRAZD_MISC"."OUTNOTE"'
      Size = 255
    end
    object qDopPodrDPUSERENTER: TIBStringField
      FieldName = 'DPUSERENTER'
      Origin = '"DETI_PODRAZD_MISC"."DPUSERENTER"'
      Size = 40
    end
    object qDopPodrDPTIMEENTER: TDateTimeField
      FieldName = 'DPTIMEENTER'
      Origin = '"DETI_PODRAZD_MISC"."DPTIMEENTER"'
    end
    object qDopPodrDPUSEREDIT: TIBStringField
      FieldName = 'DPUSEREDIT'
      Origin = '"DETI_PODRAZD_MISC"."DPUSEREDIT"'
      Size = 40
    end
    object qDopPodrDPTIMEEDIT: TDateTimeField
      FieldName = 'DPTIMEEDIT'
      Origin = '"DETI_PODRAZD_MISC"."DPTIMEEDIT"'
    end
    object qDopPodrOSN_PODR: TIBStringField
      FieldName = 'OSN_PODR'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
  object dsDopPodr: TDataSource
    DataSet = qDopPodr
    Left = 603
    Top = 268
  end
  object quDopPodr: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  DPID,'
      '  PID,'
      '  SDID,'
      '  DPDATEIN,'
      '  INNOTE,'
      '  DPDATEOUT,'
      '  OUTNOTE,'
      '  DPUSERENTER,'
      '  DPTIMEENTER,'
      '  DPUSEREDIT,'
      '  DPTIMEEDIT,'
      '  OSN_PODR'
      'from DETI_PODRAZD_MISC '
      'where'
      '  DPID = :DPID')
    ModifySQL.Strings = (
      'update DETI_PODRAZD_MISC'
      'set'
      '  DPDATEIN = :DPDATEIN,'
      '  DPDATEOUT = :DPDATEOUT,'
      '  DPID = :DPID,'
      '  INNOTE = :INNOTE,'
      '  OUTNOTE = :OUTNOTE,'
      '  PID = :PID,'
      '  SDID = :SDID'
      'where'
      '  DPID = :OLD_DPID')
    InsertSQL.Strings = (
      'insert into DETI_PODRAZD_MISC'
      '  (DPDATEIN, DPDATEOUT, DPID, INNOTE, OUTNOTE, PID, SDID)'
      'values'
      '  (:DPDATEIN, :DPDATEOUT, :DPID, :INNOTE, :OUTNOTE, :PID, :SDID)')
    DeleteSQL.Strings = (
      'delete from DETI_PODRAZD_MISC'
      'where'
      '  DPID = :OLD_DPID')
    Left = 675
    Top = 268
  end
  object qChekOsnPodr: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT LIST (SD.SDNAME, '#39', '#39') AS podr'
      'FROM DETI_PODRAZD DP'
      'INNER JOIN SYS_DIC SD ON SD.SDID = DP.SDID'
      'WHERE DP.PID = :PID AND ('
      '     CAST(DP.DPDATEIN AS DATE) <= :data2'
      
        '     AND CAST(COALESCE(DP.DPDATEOUT, CURRENT_TIMESTAMP) AS DATE)' +
        ' >= :data1)')
    Left = 704
    Top = 312
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end>
    object qChekOsnPodrPODR: TMemoField
      FieldName = 'PODR'
      ProviderFlags = []
      BlobType = ftMemo
      Size = 8
    end
  end
  object qCheckRazUsl: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dsServType
    SQL.Strings = (
      
        'WITH RECURSIVE tree (sdname, sdid, sdparid) AS (SELECT sd.sdname' +
        ', sd.sdid, sd.sdparid'
      
        '                                                                ' +
        '    FROM sys_dic sd'
      
        '                                                                ' +
        '    WHERE sd.SDPARID = 11746'
      
        '                                                                ' +
        '    UNION ALL'
      
        '                                                                ' +
        '    SELECT sd1.sdname, sd1.sdid, sd1.sdparid'
      
        '                                                                ' +
        '    FROM sys_dic sd1'
      
        '                                                                ' +
        '    INNER JOIN tree t ON t.sdid = sd1.sdparid)'
      'SELECT sdid'
      ' FROM tree t'
      ' WHERE t.sdid = :sdid')
    Left = 824
    Top = 480
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'sdid'
        ParamType = ptUnknown
      end>
  end
  object qServType_pre: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT ST.STID, ST.STTYPE, ST.STPODR, st.STISARCHIVE'
      'FROM SERVICES_TYPE ST'
      'WHERE ST.STID = :STID')
    Left = 816
    Top = 528
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'STID'
        ParamType = ptUnknown
      end>
    object qServType_preSTID: TIntegerField
      FieldName = 'STID'
      Origin = '"SERVICES_TYPE"."STID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qServType_preSTTYPE: TIntegerField
      FieldName = 'STTYPE'
      Origin = '"SERVICES_TYPE"."STTYPE"'
    end
    object qServType_preSTPODR: TIBStringField
      FieldName = 'STPODR'
      Origin = '"SERVICES_TYPE"."STPODR"'
    end
    object qServType_preSTISARCHIVE: TIntegerField
      FieldName = 'STISARCHIVE'
      Origin = '"SERVICES_TYPE"."STISARCHIVE"'
    end
  end
  object qCheckVstupitVznos: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT sc.scid'
      'FROM services s'
      'INNER JOIN services_type st ON st.stid = s.stid'
      'INNER JOIN spec_cond sc ON sc.scid = s.scid'
      'INNER JOIN agreements a ON a.agid = sc.agid'
      'INNER JOIN agr_poluch_uslug apu ON apu.agid = a.agid'
      'INNER JOIN(SELECT t1.*'
      
        '           FROM (WITH RECURSIVE tree (sdname, sdid, sdparid) AS ' +
        '(SELECT sd.sdname, sd.sdid, sd.sdparid'
      
        '                                                                ' +
        ' FROM sys_dic sd'
      
        '                                                                ' +
        ' WHERE sd.sdparid = 1987'
      
        '                                                                ' +
        ' UNION ALL'
      
        '                                                                ' +
        ' SELECT sd1.sdname, sd1.sdid, sd1.sdparid'
      ''
      
        '                                                                ' +
        ' FROM sys_dic sd1'
      
        '                                                                ' +
        ' INNER JOIN tree t ON t.sdid = sd1.sdparid) SELECT sdname,'
      
        '                                                                ' +
        '                                                   sdid,'
      
        '                                                                ' +
        '                                                   sdparid'
      
        '                                                                ' +
        '                                            FROM tree t) AS t1) ' +
        'AS sel ON sel.sdid = st.sdid'
      'WHERE apu.pid = :pid AND'
      '      sc.scisdelete IS NULL AND'
      '      a.agisdelete IS NULL   ')
    Left = 299
    Top = 356
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'pid'
        ParamType = ptUnknown
      end>
  end
  object qCheckRazovoePosesheniePriOsnUsl: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT ST.SDID'
      'FROM SPEC_COND SC '
      'INNER JOIN AGR_POLUCH_USLUG APU1 ON APU1.AGID = SC.AGID'
      'INNER JOIN SERVICES S ON S.SCID = SC.SCID '
      'INNER JOIN SERVICES_TYPE ST ON ST.STID = S.STID'
      'INNER JOIN'
      '('
      'SELECT t1.sdid'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID)'
      '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 1880'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      ') AS osn_usluga ON osn_usluga.sdid = ST.SDID'
      
        'where (COALESCE(sc.SCDATERASTORJ, SC.SCDATEEND) >= :date_begin) ' +
        'AND (SC.SCDATEBEGIN <= :date_end)'
      'AND APU1.PID = :PID AND SC.SCISDELETE IS NULL'
      'AND EXISTS'
      '('
      'SELECT t1.sdid'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID)'
      '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 11746'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'WHERE t1.sdid = :sdid AND t1.sdid NOT IN (1906, 1905, 13569)'
      ')')
    Left = 296
    Top = 392
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'date_begin'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_end'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'sdid'
        ParamType = ptUnknown
      end>
    object qCheckRazovoePosesheniePriOsnUslSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"SERVICES_TYPE"."SDID"'
    end
  end
  object qPeriodOplaty: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT FIRST 1 PO.POID'
      'FROM PERIOD_OPLATY PO'
      'WHERE PO.POIS_ACTIVE = 1')
    Left = 680
    Top = 656
    object qPeriodOplatyPOID: TIntegerField
      FieldName = 'POID'
      Origin = '"PERIOD_OPLATY"."POID"'
    end
  end
  object sqlInsertPodrazdSC: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      
        'INSERT INTO DETI_PODRAZD_SC (DPID, SCID, SDID, DPTYPE, DPDATEIN,' +
        ' INNOTE, DPDATEOUT)'
      
        'VALUES(GEN_ID(GEN_DETI_PODRAZD_SC_ID,1), :scid, :SDID, :DPTYPE, ' +
        ':DPDATEIN, :INNOTE, :DPDATEOUT)')
    Transaction = DMInv.IBTransaction1
    Left = 497
    Top = 300
  end
  object qCheckExistEnranceFee: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'select CH.AGID, CH.SCID'
      'from P_CHECK_EXIST_ENTRANCE_FEE(:APID, :ADATE, :IN_AGID) CH')
    Left = 345
    Top = 372
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'APID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'ADATE'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'IN_AGID'
        ParamType = ptUnknown
      end>
  end
  object qCheckOsnUsl: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT sc.scid'
      'FROM services s'
      'INNER JOIN services_type st ON st.stid = s.stid'
      'INNER JOIN spec_cond sc ON sc.scid = s.scid'
      'INNER JOIN agreements a ON a.agid = sc.agid'
      'INNER JOIN agr_poluch_uslug apu ON apu.agid = a.agid'
      'INNER JOIN(SELECT t1.*'
      
        '           FROM (WITH RECURSIVE tree (sdname, sdid, sdparid) AS ' +
        '(SELECT sd.sdname, sd.sdid, sd.sdparid'
      
        '                                                                ' +
        ' FROM sys_dic sd'
      
        '                                                                ' +
        ' WHERE sd.sdparid = 1880'
      
        '                                                                ' +
        ' UNION ALL'
      
        '                                                                ' +
        ' SELECT sd1.sdname, sd1.sdid, sd1.sdparid'
      ''
      
        '                                                                ' +
        ' FROM sys_dic sd1'
      
        '                                                                ' +
        ' INNER JOIN tree t ON t.sdid = sd1.sdparid) SELECT sdname,'
      
        '                                                                ' +
        '                                                   sdid,'
      
        '                                                                ' +
        '                                                   sdparid'
      
        '                                                                ' +
        '                                            FROM tree t) AS t1) ' +
        'AS sel ON sel.sdid = st.sdid'
      'WHERE apu.pid = :pid AND'
      '      sc.scisdelete IS NULL AND'
      '      a.agisdelete IS NULL'
      
        '      AND sc.SCDATEEND >= :date_begin AND sc.SCDATEBEGIN <= :dat' +
        'e_end'
      '      AND sc.SCID <> :scid')
    Left = 347
    Top = 404
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'pid'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_begin'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_end'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'scid'
        ParamType = ptUnknown
      end>
  end
  object qDolg: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      'EXECUTE PROCEDURE SP_BALANCE (:PID)')
    Transaction = DMInv.trWrite
    Left = 536
    Top = 301
  end
  object qSvcPhoto: TpFIBDataSet
    SelectSQL.Strings = (
      'select spid,fnumber,fcount'
      'from SERVICES_PHOTO'
      'where sid = :SID'
      'order by fnumber')
    AutoUpdateOptions.UpdateTableName = 'SERVICES_PHOTO'
    AutoUpdateOptions.AutoReWriteSqls = True
    AutoUpdateOptions.CanChangeSQLs = True
    AutoUpdateOptions.AutoParamsToFields = True
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    UpdateTransaction = DMInv.trFibWrite
    Left = 808
    Top = 320
    oFetchAll = True
  end
  object qPhotoClear: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'delete from SERVICES_PHOTO where sid = :SID')
    Left = 864
    Top = 320
    qoStartTransaction = True
  end
  object qPhotoAdd: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      
        'insert into SERVICES_PHOTO(spid,sid,fnumber,fcount) values (gen_' +
        'id(GEN_SERVICE_PHOTO_ID,1),:sid,:fnumber,:fcount)')
    Left = 912
    Top = 320
    qoStartTransaction = True
  end
  object dxBarManager1: TdxBarManager
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -12
    Font.Name = 'Segoe UI'
    Font.Style = []
    Categories.Strings = (
      #1055#1086' '#1091#1084#1086#1083#1095#1072#1085#1080#1102)
    Categories.ItemsVisibles = (
      2)
    Categories.Visibles = (
      True)
    ImageOptions.Images = DMInv.cxSmallImages
    ImageOptions.LargeImages = DMInv.cxLargeImages
    PopupMenuLinks = <>
    UseSystemFont = True
    Left = 808
    Top = 624
    DockControlHeights = (
      0
      0
      0
      0)
    object dxBarManager1Bar1: TdxBar
      AllowClose = False
      AllowCustomizing = False
      AllowQuickCustomizing = False
      AllowReset = False
      BorderStyle = bbsNone
      Caption = #1053#1072#1089#1090#1088#1086#1081#1082#1072' 1'
      CaptionButtons = <>
      DockControl = dxbrdckcntrl1
      DockedDockControl = dxbrdckcntrl1
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 480
      FloatTop = 131
      FloatClientWidth = 51
      FloatClientHeight = 22
      ItemLinks = <
        item
          Visible = True
          ItemName = 'bAdd'
        end
        item
          Visible = True
          ItemName = 'bDelete'
        end>
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      Visible = True
      WholeRow = True
    end
    object dxBarManager1Bar2: TdxBar
      AllowClose = False
      AllowCustomizing = False
      AllowQuickCustomizing = False
      AllowReset = False
      BorderStyle = bbsNone
      Caption = #1053#1072#1089#1090#1088#1086#1081#1082#1072' 2'
      CaptionButtons = <>
      DockControl = dxBarDockControl1
      DockedDockControl = dxBarDockControl1
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 480
      FloatTop = 131
      FloatClientWidth = 0
      FloatClientHeight = 0
      ItemLinks = <
        item
          Visible = True
          ItemName = 'bAddTime'
        end
        item
          Visible = True
          ItemName = 'bDelTime'
        end>
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      Visible = True
      WholeRow = True
    end
    object bAdd: TdxBarButton
      Caption = #1053#1086#1074#1072#1103' '#1082#1085#1086#1087#1082#1072
      Category = 0
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100
      Visible = ivAlways
      ImageIndex = 40
      OnClick = bAddClick
    end
    object bDelete: TdxBarButton
      Caption = #1059#1076#1072#1083#1080#1090#1100
      Category = 0
      Hint = #1059#1076#1072#1083#1080#1090#1100
      Visible = ivAlways
      ImageIndex = 46
      OnClick = bDeleteClick
    end
    object bAddTime: TdxBarButton
      Caption = #1044#1086#1073#1072#1074#1080#1090#1100' '#1074#1088#1077#1084#1103
      Category = 0
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1074#1088#1077#1084#1103
      Visible = ivAlways
      ImageIndex = 40
      OnClick = bAddTimeClick
    end
    object bDelTime: TdxBarButton
      Caption = #1059#1076#1072#1083#1080#1090#1100
      Category = 0
      Hint = #1059#1076#1072#1083#1080#1090#1100
      Visible = ivAlways
      ImageIndex = 46
      OnClick = bDelTimeClick
    end
  end
  object qAddMed: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'INSERT INTO SERVICES_MED '
      '(SMID, SCID, MCAPTION, MDOZE, MCOUNT)'
      'VALUES'
      '(GEN_ID(GEN_SERVICES_MED,1), :SCID, :MCAPTION, :MDOZE, :MCOUNT)'
      'RETURNING SMID')
    Left = 792
    Top = 256
  end
  object qDelMed: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'DELETE FROM SERVICES_MED WHERE SCID = :SCID')
    Left = 840
    Top = 256
  end
  object qAddMedTime: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'INSERT INTO SERVICES_MED_TIME'
      '(SMTID, SMID, SMHOUR)'
      'VALUES'
      '(GEN_ID(GEN_SERVICES_MED_TIME,1), :SMID, :SMHOUR)')
    Left = 912
    Top = 256
  end
  object qDelMedTime: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'DELETE FROM SERVICES_MED_TIME WHERE SMID = :SMID')
    Left = 960
    Top = 256
  end
  object qSelMed: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'SELECT *'
      'FROM SERVICES_MED '
      'WHERE SCID = :SCID')
    Left = 896
    Top = 208
  end
  object qSelMedTime: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'SELECT *'
      'FROM SERVICES_MED_TIME '
      'WHERE SMID = :SMID')
    Left = 960
    Top = 208
  end
end
